package org.ilc.push;

import org.ilc.push.socket.IConnectionListener;
import org.ilc.push.socket.IHeader;
import org.ilc.push.socket.SocketConnection;

import java.io.IOException;

public class SampleTestSocket {

	
	public static void main(String[] a) throws IOException{
	
		//System.out.println( Integer.parseInt(null));
		
		SocketConnection conn=
			new SocketConnection (new IConnectionListener (){

				@Override
				public void messageReceived(IHeader header, byte[] body) {
					// TODO Auto-generated method stub
					System.out.println(new String(body));
				}

				@Override
				public void onClose() {
					// TODO Auto-generated method stub
					
				}

				@Override
				public void onConnection(SocketConnection conn) {
					// TODO Auto-generated method stub
					
//				}}, 1000, "lenbo", "002001", "2", "20130118");
//				}}, 2000, "20130101", "130101", "1", "20130118");
//				}}, 2000, "201301001", "301001", "1", "20130118");
//				}}, 2000, "201202003", "202003", "1", "20130118");
//				}}, 2000, "201202002", "202002", "1", "20130118");
				}}, 1000, "2025087", "025087", "1", "20130118");
//                }}, 100, "laoshi623897", "623897","2","2");
//				}}, 1000, "T2002002", "002002", "2", "20130118");
//				}}, 1000, "t2002001", "002001", "2", "20130118");
//		conn.connection("58.134.1.123", 8889);
		conn.connection("192.168.7.53", 8889);
//		conn.connection("211.103.210.25", 8889);
//		conn.connection("127.0.0.1", 8889);
//		System.in.read();
	}
}
